package com.shop.utils;

import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class MD5Util {

	public static String md5(String pwd){
		try {
			byte[] digest = MessageDigest.getInstance("md5").digest(pwd.getBytes());
			return new BigInteger(1,digest).toString(16);
		} catch (NoSuchAlgorithmException e) {
			e.printStackTrace();
		}
		return null;
	}
}
